// component/NavigationBar.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    isNeedBackBotton: {
      type: Boolean,
      value: true
    }, //是否需要返回按钮
    title: {
      type: String,
      value: '导航'
    }, //标题
    icon:{
      type:String,
      value:"./icon/arrow_left_black.png"
    },
    center: {
      type: Boolean,
      value: true
    },
    needShadow: {
      type: Boolean,
      value: true
    },
    statusBarHeight:{
      type:Number,
      value:20
    }
  },


  attached:function(){
    const info = wx.getSystemInfoSync();
    console.log(info)
    this.setData({statusBarHeight:info.statusBarHeight})
  },

  /**
   * 组件的初始数据
   */
  data: {
    statusBarHeight: 20
  },
  //用于自定义字体样式
  externalClasses: ['customer-title','customer-back','customer-background'],

  /**
   * 组件的方法列表
   */
  methods: {
    attached:function(){
      const info = wx.getSystemInfoSync();
      console.log(info);
    },  
    backBottonPressed: function (e) {
      this.triggerEvent('popMethod', e, {});
    }
  }
})